package top.guxx.mall.service.impl;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import top.guxx.mall.config.RedisService;
import top.guxx.mall.constants.Constants;
import top.guxx.mall.service.ICartService;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author：Guxx
 * @Description：
 * @Date：2025/2/23 3:15
 * @Filename：CartService
 */
@Service
@Slf4j
public class CartService implements ICartService {
    @Resource
    private RedisService redisService;

    @Override
    public List<String> queryInCartProducts(String userId){
        return redisService.getAllElements(Constants.RedisKey.CART.getCode()+ userId);
    }

}
